import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.TreeSet;
import java.util.Iterator;




public class Set {
	public static void main(String[] felight){
	HashSet hashSet = new HashSet();
	LinkedHashSet linkedHashSet = new LinkedHashSet();
	TreeSet treeSet = new TreeSet();
	hashSet.add("Blue");
	hashSet.add("Red");
	hashSet.add("yellow");
	hashSet.add("Orange");
	hashSet.add("White");
	linkedHashSet.add("Blue");
	linkedHashSet.add("Red");
	linkedHashSet.add("yellow");
	linkedHashSet.add("orange");
	linkedHashSet.add("white");
	treeSet.add("Blue");
	treeSet.add("Red");
	treeSet.add("yellow");
	treeSet.add("orange");
	treeSet.add("white");
	System.out.println("items inside hashSet\n");
	Iterator hashSetIterator = hashSet.iterator();
	while(hashSetIterator.hasNext()){
		String element = (String) hashSetIterator.next();
		System.out.println(element);
	}
	System.out.println("items inside linkedhashSet\n");
	Iterator linkedhashSetIterator = hashSet.iterator();
	while(linkedhashSetIterator.hasNext()){
		String element = (String) linkedhashSetIterator.next();
		System.out.println(element);
	}
	System.out.println("items inside treeSet\n");
	Iterator treeSetIterator = treeSet.iterator();
	while(treeSetIterator.hasNext()){
		String element = (String) treeSetIterator.next();
		System.out.println(element);
	}
	
	}
	
	
	
	

}
